//
// Created by Semir on 2020/3/28.
//

#include <iostream>
#include <deque>
#include <cstring>
#include <string>

using namespace std;

int num;

void test01() {
    //    cin >> strA >> strB;
//    string strAS[MAX_RULE_NUN];
//    string strBS[MAX_RULE_NUN];
    num = 0;
    string str = "";
    char *s;
    while (true) {
        getline(cin, str);
        cout << "out:" << str << "#" << endl;
        if (str == "") {
            break;
        }
        num++;
    }
//    char c;
//    while (cin >> strAS[num] >> strBS[num]) {
//        num++;
//    }
    cout << endl;
    cout << num << endl;
}

void getTwoPhaseStrings() {
    char c = '\0';
    string str1, str2, str3, str4;
    while (true) {
        cin >> str1;
        if (c != '\0') {
            str1 = c + str1;
        }
        cin.get();
        cin >> str2;
        cin.get();
        cout << "out1:" << str1 << "*" << endl;
        cout << "out2:" << str2 << "*" << endl;
        num++;
        c = cin.get();
        if (c == '\n') {
            cout << num << endl;
            break;
        }
    }
}

void test02() {
    char c = '\0';
    string str1, str2, str3, str4;
    while (true) {
        cin >> str1;
        if (c != '\0') {
            str1 = c + str1;
        }
        cin.get();
        cin >> str2;
        cin.get();
        cout << "out1:" << str1 << "*" << endl;
        cout << "out2:" << str2 << "*" << endl;
        num++;
        c = cin.get();
        if (c == '\n') {
            cout << num << endl;
            break;
        }
    }
}

int main() {
    string str1, str2, str3, str4;
    while (true) {
        getline(cin, str3, '\n');
        if (str3 == "") {
            break;
        }
        int index = str3.find(' ');
        str1 = str3.substr(0, index);
        str2 = str3.substr(index + 1);
        cout << "out1:" << str1 << "#" << endl;
        cout << "out2:" << str2 << "#" << endl;
    }
    cout << "*******" << endl;
//    getline(cin, str1, ' ');
//    getline(cin, str2, '\n');
//    getline(cin, str3, '\n');
//    cout << "out1:" << str1 << "#" << endl;
//    cout << "out2:" << str2 << "#" << endl;
//    cout << "out3:" << (str3 == "") << "#" << endl;
    return 0;
}